package com.customer.dto;

import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import javax.validation.constraints.NotBlank;
import javax.validation.constraints.Pattern;

@Data
@ApiModel(description = "用户更新数据模型")
public class UserUpdateDTO {

    @ApiModelProperty("用户ID")
    private Long id;

    @NotBlank(message = "昵称不能为空")
    @ApiModelProperty("用户昵称")
    private String nickname;

    @Pattern(regexp = "^1[3-9]\\d{9}$", message = "手机号格式不正确")
    @ApiModelProperty("用户手机号")
    private String phone;

    @ApiModelProperty("用户头像URL")
    private String avatar;
}